\(\int (b \sec (e+f x))^n \sin (e+f x) \, dx\) [494]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 17, antiderivative size = 25 \[ \int (b \sec (e+f x))^n \sin (e+f x) \, dx=-\frac {b (b \sec (e+f x))^{-1+n}}{f (1-n)} \]

[Out]

-b*(b*sec(f*x+e))^(-1+n)/f/(1-n)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {2702, 30} \[ \int (b \sec (e+f x))^n \sin (e+f x) \, dx=-\frac {b (b \sec (e+f x))^{n-1}}{f (1-n)} \]

[In]

Int[(b*Sec[e + f*x])^n*Sin[e + f*x],x]

[Out]

-((b*(b*Sec[e + f*x])^(-1 + n))/(f*(1 - n)))

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2702

Int[csc[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Dist[1/(f*a^n), Subst[Int
[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/2), x], x, a*Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n
 + 1)/2] &&  !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])

Rubi steps \begin{align*} \text {integral}& = \frac {b \text {Subst}\left (\int x^{-2+n} \, dx,x,b \sec (e+f x)\right )}{f} \\ & = -\frac {b (b \sec (e+f x))^{-1+n}}{f (1-n)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.88 \[ \int (b \sec (e+f x))^n \sin (e+f x) \, dx=\frac {b (b \sec (e+f x))^{-1+n}}{f (-1+n)} \]

[In]

Integrate[(b*Sec[e + f*x])^n*Sin[e + f*x],x]

[Out]

(b*(b*Sec[e + f*x])^(-1 + n))/(f*(-1 + n))

Maple [A] (verified)

Time = 0.69 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.12

method result size
parallelrisch \(\frac {\cos \left (f x +e \right ) \left (\frac {b}{\cos \left (f x +e \right )}\right )^{n}}{f \left (-1+n \right )}\) \(28\)
derivativedivides \(\frac {{\mathrm e}^{n \ln \left (b \sec \left (f x +e \right )\right )}}{f \left (-1+n \right ) \sec \left (f x +e \right )}\) \(30\)
default \(\frac {{\mathrm e}^{n \ln \left (b \sec \left (f x +e \right )\right )}}{f \left (-1+n \right ) \sec \left (f x +e \right )}\) \(30\)
norman \(\frac {\frac {{\mathrm e}^{n \ln \left (\frac {b \left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{1-\left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}\right )}}{f \left (-1+n \right )}-\frac {\left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right ) {\mathrm e}^{n \ln \left (\frac {b \left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{1-\left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}\right )}}{f \left (-1+n \right )}}{1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )}\) \(120\)
risch \(\frac {\left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{-n} \cos \left (f x +e \right ) \left ({\mathrm e}^{i \left (f x +e \right )}\right )^{n} 2^{n} b^{n} {\mathrm e}^{\frac {i \pi n \left (-\operatorname {csgn}\left (\frac {i b \,{\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right )^{3}+\operatorname {csgn}\left (\frac {i b \,{\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right )^{2} \operatorname {csgn}\left (i b \right )+\operatorname {csgn}\left (\frac {i b \,{\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right )^{2} \operatorname {csgn}\left (\frac {i {\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right )-\operatorname {csgn}\left (\frac {i b \,{\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right ) \operatorname {csgn}\left (i b \right ) \operatorname {csgn}\left (\frac {i {\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right )-\operatorname {csgn}\left (\frac {i {\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right )^{3}+\operatorname {csgn}\left (\frac {i {\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right )^{2} \operatorname {csgn}\left (i {\mathrm e}^{i \left (f x +e \right )}\right )+\operatorname {csgn}\left (\frac {i {\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right )^{2} \operatorname {csgn}\left (\frac {i}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right )-\operatorname {csgn}\left (\frac {i {\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right ) \operatorname {csgn}\left (i {\mathrm e}^{i \left (f x +e \right )}\right ) \operatorname {csgn}\left (\frac {i}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right )\right )}{2}}}{\left (-1+n \right ) f}\) \(413\)

[In]

int((b*sec(f*x+e))^n*sin(f*x+e),x,method=_RETURNVERBOSE)

[Out]

1/f/(-1+n)*cos(f*x+e)*(b/cos(f*x+e))^n

Fricas [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.12 \[ \int (b \sec (e+f x))^n \sin (e+f x) \, dx=\frac {\left (\frac {b}{\cos \left (f x + e\right )}\right )^{n} \cos \left (f x + e\right )}{f n - f} \]

[In]

integrate((b*sec(f*x+e))^n*sin(f*x+e),x, algorithm="fricas")

[Out]

(b/cos(f*x + e))^n*cos(f*x + e)/(f*n - f)

Sympy [F]

\[ \int (b \sec (e+f x))^n \sin (e+f x) \, dx=\int \left (b \sec {\left (e + f x \right )}\right )^{n} \sin {\left (e + f x \right )}\, dx \]

[In]

integrate((b*sec(f*x+e))**n*sin(f*x+e),x)

[Out]

Integral((b*sec(e + f*x))**n*sin(e + f*x), x)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.12 \[ \int (b \sec (e+f x))^n \sin (e+f x) \, dx=\frac {b^{n} \cos \left (f x + e\right )^{-n} \cos \left (f x + e\right )}{f {\left (n - 1\right )}} \]

[In]

integrate((b*sec(f*x+e))^n*sin(f*x+e),x, algorithm="maxima")

[Out]

b^n*cos(f*x + e)^(-n)*cos(f*x + e)/(f*(n - 1))

Giac [F]

\[ \int (b \sec (e+f x))^n \sin (e+f x) \, dx=\int { \left (b \sec \left (f x + e\right )\right )^{n} \sin \left (f x + e\right ) \,d x } \]

[In]

integrate((b*sec(f*x+e))^n*sin(f*x+e),x, algorithm="giac")

[Out]

integrate((b*sec(f*x + e))^n*sin(f*x + e), x)

Mupad [B] (verification not implemented)

Time = 0.21 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.08 \[ \int (b \sec (e+f x))^n \sin (e+f x) \, dx=\frac {\cos \left (e+f\,x\right )\,{\left (\frac {b}{\cos \left (e+f\,x\right )}\right )}^n}{f\,\left (n-1\right )} \]

[In]

int(sin(e + f*x)*(b/cos(e + f*x))^n,x)

[Out]

(cos(e + f*x)*(b/cos(e + f*x))^n)/(f*(n - 1))